File: /var/www/html/owlcrm/database/migrations/2024_05_22_100537_create_companies_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('companies', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->string('name');
$table->text('description')->nullable();
$table->string('address_line_1');
$table->string('address_line_2')->nullable();
$table->unsignedBigInteger('country');
$table->unsignedBigInteger('city');
$table->unsignedBigInteger('state');
$table->string('postal_code');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('companies');
}
};